<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Test06</title>
</head>
<body>
<script type="text/javascript">
    let a = 3;
    let b = 5;

    [a, b] = [b, a];

    console.log(a);
    console.log(b);

    var student1 = {"name": "zhangsan", "age": 18, "sex": true, "birthday": new Date()};

    let {name: stu_name, age: stu_age} = student1;

    console.log(stu_name);
    console.log(stu_age);

    var map = new Map();
    map.set('first', 'hello');
    map.set('second', 'world');

    for (let [key, val] of map) {
        console.log(key + ":" + val);
    }

    for (let [key] of map) {
        console.log(key);
    }

    for (let [, val] of map) {
        console.log(val);
    }
</script>
</body>
</html>